package com.ntes.consumer3.service.impl;

import com.ntes.consumer3.service.IDemo1Service;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Service;

/**
 * Created by june on 2017/5/28.
 */
@Service
public class Demo1ServiceFallbackFactory implements FallbackFactory<IDemo1Service> {
    @Override
    public IDemo1Service create(Throwable throwable) {
        System.out.println("throwable:" + throwable);
        return id -> {
            System.out.println("ff");
            return "default";
        };
    }
}
